package com.ciquan.server.util;

import org.apache.log4j.Logger;

import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * Created by kakalee on 16/3/6.
 */
public class DateValueParser extends ValueParser{

    protected Logger logger = Logger.getLogger(this.getClass());

    @Override
    public Object parse(String value){
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        try {
            return dateFormat.parse(value);
        } catch (ParseException e) {
            logger.error(e);
        }
        return null;
    }
}
